The Shulhan Aruch (Orah Haim 202) rules that if person eats dry ginger by itself, he does not recite a Beracha before eating. Since dry ginger is not normally eaten by itself, and it is in fact very difficult to eat by itself, due to its exceptionally sharp taste, no Beracha is recited.
This applies as well to black or white pepper. Since these spices are not normally eaten on their own, and have a very sharp taste that make it very difficult and unpleasant to eat them on their own, one who nevertheless eats such a spice on its own does not recite a Beracha.
However, if a spice can be eaten on its own, but is normally used only as seasoning, and not eaten by itself, then one who eats the spice on its own recites a Beracha – though the Beracha is "downgraded" to "She’ha’kol." Examples include spices such as oregano and cumin, and condiments such as mustard. Since they can be eaten on their own, they require a Beracha, but since they are not normally eaten on their own, one recites "She’ha’kol" instead of "Ha’adama." This applies also to mint, parsley and cilantro. These leaves are not normally eaten on their own, but are edible by themselves, and so one who eats them on their own recites "She’ha’kol."
The Shulhan Aruch writes that one who eats cinnamon (which the Shulhan Aruch calls "Kanila") by itself – something which was not uncommon in his time – recites "Boreh Peri Ha’adama." Although cinnamon is taken from a tree, its Beracha is "Ha’adama," and not "Ha’etz," since it is extracted from the tree’s bark. As it is not made from a fruit, it cannot be considered "Peri Ha’etz" ("the fruit of the tree"), and so its Beracha is "Ha’adama." Hacham David Yosef, in Halacha Berura, writes that nowadays, it is not common to eat cinnamon by itself, and so the Beracha in our times is "She’ha’kol." However, Rav Yisrael Bitan raised the possibility that this might be true only of ground cinnamon, but not cinnamon sticks, which some people indeed use for sucking. He leaves it as an open question whether perhaps the Beracha over cinnamon sticks should perhaps be "Ha’adama," since they are not uncommonly consumed on their own.
It should be noted that if one mixes ground cinnamon with sugar, the Beracha becomes "Ha’adama." Since it is now enhanced, and is commonly eaten in this fashion, it is restored to its original Beracha of "Ha’adama."
Summary: If a spice is hardly edible on its own, such as dry ginger and black pepper, then one who eats it on its own does not recite a Beracha. If a spice or condiment is edible on its own, but is not normally eaten on its own, then one who eats it on its own recites "She’ha’kol," even if the spice grows from the ground. Examples include oregano, cumin, mustard, mint, parsley and cilantro. One who eats ground cinnamon on its own recites "She’ha’kol," though if it is mixed with sugar, the Beracha is "Ha’adama." It is unclear whether one should recite "Ha’adama" or "She’ha’kol" over cinnamon sticks.